package cn.com.lms.business.course.persistence.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "bnz_course_category", schema = "bnzj", catalog = "")
public class FbCourseCategory {
    private long id;
    private long parentId;
    private String name;
    private int sort;
    private String isDelete;
    private long creator;
    private Timestamp createTime;
    private Long modifyBy;
    private Timestamp modifyTime;
    private String creatorName;
    private String modifyName;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "parent_id")
    public long getParentId() {
        return parentId;
    }

    public void setParentId(long parentId) {
        this.parentId = parentId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sort")
    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    @Basic
    @Column(name = "is_delete")
    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "creator")
    public long getCreator() {
        return creator;
    }

    public void setCreator(long creator) {
        this.creator = creator;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_by")
    public Long getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(Long modifyBy) {
        this.modifyBy = modifyBy;
    }

    @Basic
    @Column(name = "modify_time")
    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Basic
    @Column(name = "creator_name")
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Basic
    @Column(name = "modify_name")
    public String getModifyName() {
        return modifyName;
    }

    public void setModifyName(String modifyName) {
        this.modifyName = modifyName;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FbCourseCategory that = (FbCourseCategory) o;
        return id == that.id &&
                parentId == that.parentId &&
                sort == that.sort &&
                creator == that.creator &&
                Objects.equals(name, that.name) &&
                Objects.equals(isDelete, that.isDelete) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(modifyBy, that.modifyBy) &&
                Objects.equals(modifyTime, that.modifyTime) &&
                Objects.equals(creatorName, that.creatorName) &&
                Objects.equals(modifyName, that.modifyName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, parentId, name, sort, isDelete, creator, createTime, modifyBy, modifyTime, creatorName, modifyName);
    }
}
